import type { User } from '@/apis/userApi'
import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', {
    state: () => ({ 
            info: {} as null | User,
        }),
    getters: {
        DeptCode: (state) => state.info!.DeptCode,
        Permission: (state) => state.info!.Permission,
    },
    actions: {
            getUserInfo(result:User){
            this.info = result
        },
    },
    // 其他配置...
  })